/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmMaterialcheck extends BasicModel<PmMaterialcheck> {
  createtime?: string; // 创建时间
  name?: string; // name
  state?: number; // 抽检状态
  remark?: string; // 备注
  checker?: string; // 抽检人
  checkdate?: string; // 抽检日期
  projectno?: string; // 工程编号
  projectname?: string; // 工程名称
  reviewer?: string; // 复核人
  reviewdate?: string; // 复核日期
  dealwithper?: string; // 处理人
  dealwithdate?: string; // 处理时间
  dealwithresult?: string; // 处理结果
  dealwithoptime?: string; // 处理记录时间
  fileno?: string; // 图片
  pmMaterialchecksList?: any[]; // 子表列表
}

export const pmMaterialcheckList = (params?: PmMaterialcheck | any) =>
  defHttp.get<PmMaterialcheck>({ url: adminPath + '/material/check/pmMaterialcheck/list', params });

export const pmMaterialcheckListData = (params?: PmMaterialcheck | any) =>
  defHttp.post<Page<PmMaterialcheck>>({ url: adminPath + '/material/check/pmMaterialcheck/listData', params });

export const pmMaterialcheckForm = (params?: PmMaterialcheck | any) =>
  defHttp.get<PmMaterialcheck>({ url: adminPath + '/material/check/pmMaterialcheck/form', params });

export const pmMaterialcheckSave = (params?: any, data?: PmMaterialcheck | any) =>
  defHttp.postJson<PmMaterialcheck>({ url: adminPath + '/material/check/pmMaterialcheck/save', params, data });

export const pmMaterialcheckDelete = (params?: PmMaterialcheck | any) =>
  defHttp.get<PmMaterialcheck>({ url: adminPath + '/material/check/pmMaterialcheck/delete', params });

export const pmMaterialcheckfailed = (params?: PmMaterialcheck | any) =>
  defHttp.post<PmMaterialcheck>({ url: adminPath + '/material/check/pmMaterialcheck/failed', params });
  